from xlwt import Workbook

wb=Workbook('utf-8')
sheet=wb.add_sheet('部门表')
title=['部门编号','部门名称','部门地址']
for i in range(len(title)):
    sheet.write(0,i,title[i])
wb.save(r'H:\python\write_excle\excle2.xls')